// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init() // 使用当前云环境
 const database = cloud.database();
// 云函数入口函数
exports.main = async (event, context) => {
      return await database.collection("tb_final").aggregate().lookup({
         from:"tb_rudui",
         localField:"userid",
         foreignField:"userid",
         ad:"list"

      }).match({
         userid:event.userid,
        matchid:event.matchid
      }).end();
}